import request from '@/utils/request'

// 获取部门列表
export const getDepartmentApi = () => request({
  url: '/company/department'
})

// 删除指定部门
export const delDepartmentApi = id => request({
  url: `/company/department/${id}`,
  method: 'DELETE'
})

// 新增部门
export const addDepartmentApi = data => request({
  url: '/company/department',
  method: 'POST',
  data
})

// 获取部门详情数据
export const getDeptsById = id => request({
  url: `/company/department/${id}`
})


// 编辑部门
export const editDeptsById = (id, data) => request({
  url: `/company/department/${id}`,
  method: 'PUT',
  data
})
